package com.zhentao.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 水质标准表
 * @TableName water_quality_standard
 */
@TableName(value ="water_quality_standard")
@Data
public class WaterQualityStandard implements Serializable {
    /**
     * 标准ID
     */
    @TableId(type = IdType.AUTO)
    private Long standardId;

    /**
     * 指标名称
     */
    private String indicatorName;

    /**
     * 指标编码
     */
    private String indicatorCode;

    /**
     * 标准类型
     */
    private String standardType;

    /**
     * I类标准最大值
     */
    private BigDecimal grade1Max;

    /**
     * II类标准最大值
     */
    private BigDecimal grade2Max;

    /**
     * III类标准最大值
     */
    private BigDecimal grade3Max;

    /**
     * IV类标准最大值
     */
    private BigDecimal grade4Max;

    /**
     * V类标准最大值
     */
    private BigDecimal grade5Max;

    /**
     * 单位
     */
    private String unit;

    /**
     * 创建时间
     */
    private Date createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WaterQualityStandard other = (WaterQualityStandard) that;
        return (this.getStandardId() == null ? other.getStandardId() == null : this.getStandardId().equals(other.getStandardId()))
            && (this.getIndicatorName() == null ? other.getIndicatorName() == null : this.getIndicatorName().equals(other.getIndicatorName()))
            && (this.getIndicatorCode() == null ? other.getIndicatorCode() == null : this.getIndicatorCode().equals(other.getIndicatorCode()))
            && (this.getStandardType() == null ? other.getStandardType() == null : this.getStandardType().equals(other.getStandardType()))
            && (this.getGrade1Max() == null ? other.getGrade1Max() == null : this.getGrade1Max().equals(other.getGrade1Max()))
            && (this.getGrade2Max() == null ? other.getGrade2Max() == null : this.getGrade2Max().equals(other.getGrade2Max()))
            && (this.getGrade3Max() == null ? other.getGrade3Max() == null : this.getGrade3Max().equals(other.getGrade3Max()))
            && (this.getGrade4Max() == null ? other.getGrade4Max() == null : this.getGrade4Max().equals(other.getGrade4Max()))
            && (this.getGrade5Max() == null ? other.getGrade5Max() == null : this.getGrade5Max().equals(other.getGrade5Max()))
            && (this.getUnit() == null ? other.getUnit() == null : this.getUnit().equals(other.getUnit()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getStandardId() == null) ? 0 : getStandardId().hashCode());
        result = prime * result + ((getIndicatorName() == null) ? 0 : getIndicatorName().hashCode());
        result = prime * result + ((getIndicatorCode() == null) ? 0 : getIndicatorCode().hashCode());
        result = prime * result + ((getStandardType() == null) ? 0 : getStandardType().hashCode());
        result = prime * result + ((getGrade1Max() == null) ? 0 : getGrade1Max().hashCode());
        result = prime * result + ((getGrade2Max() == null) ? 0 : getGrade2Max().hashCode());
        result = prime * result + ((getGrade3Max() == null) ? 0 : getGrade3Max().hashCode());
        result = prime * result + ((getGrade4Max() == null) ? 0 : getGrade4Max().hashCode());
        result = prime * result + ((getGrade5Max() == null) ? 0 : getGrade5Max().hashCode());
        result = prime * result + ((getUnit() == null) ? 0 : getUnit().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", standardId=").append(standardId);
        sb.append(", indicatorName=").append(indicatorName);
        sb.append(", indicatorCode=").append(indicatorCode);
        sb.append(", standardType=").append(standardType);
        sb.append(", grade1Max=").append(grade1Max);
        sb.append(", grade2Max=").append(grade2Max);
        sb.append(", grade3Max=").append(grade3Max);
        sb.append(", grade4Max=").append(grade4Max);
        sb.append(", grade5Max=").append(grade5Max);
        sb.append(", unit=").append(unit);
        sb.append(", createTime=").append(createTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}